home *** CD-ROM | disk | FTP | other *** search
/ Floppyshop 2 / Floppyshop - 2.zip / Floppyshop - 2.iso / art&graf.ix / art-3139 / boot_pic.mug / boot_neo.s < prev    next >
Text File  |  1987-04-21  |  2KB  |  91 lines

  1. ;
  2. ; NeoChrome Picture Booter v2.0
  3. ; -----------------------------
  4. ;
  5. ; Coded by: MUG U.K/Mike Mee !!
  6. ;
  7. ; v1.0 - Used in Super Virus Killer v1.0
  8. ; v2.0 - Used in PVK v2.1
  9. ;
  10.  
  11. ; NEOCHROME pictures:-       0 -     3 = resolution
  12. ;               4 -    35 = palette data
  13. ;              36 -   123 = other data
  14. ;             124 -   127 = 'NEO!' header
  15. ;             129 - 32128 = picture data
  16.  
  17. pic_adr    equ    $20000
  18.  
  19. yes    equ    1
  20. no    equ    0
  21.  
  22. text_on    equ    yes    ; no = saves 12 bytes + length of text
  23.  
  24.     opt    p+,o+,d-,s-
  25.  
  26.     bra.s    start
  27.     dc.b    "Coded by: MUG U.K",191," - 15/10/1991",0
  28.  
  29. start    
  30.     ifne    text_on
  31.     pea    text(pc) 
  32.     move.w    #9,-(a7)
  33.     trap    #1
  34.     addq.w    #6,a7
  35.     endc
  36.  
  37.     lea    filename(pc),a0    ; file to load
  38.     move.l    #pic_adr-128,d6    ; destination address
  39.     move.l    #32128,d7     ; length = 32128
  40.  
  41. loadit    lea    handle(pc),a6    
  42.     clr.w    -(a7)         ; mode = 0 (open to read)
  43.     move.l    a0,-(a7)        ; filename to open
  44.     move.w    #$3d,-(a7)    ; f_open
  45.     trap    #1        ; do it !!
  46.     addq.l    #8,a7        ; tidy stack
  47.     move.w    d0,(a6)         ; store file handle returned
  48.  
  49.     move.l    d6,-(a7)        ; address to load to
  50.     move.l    d7,-(a7)        ; amount to read in
  51.     move.w    d0,-(a7)        ; file handle
  52.     move.w    #$3f,-(a7)    ; f_read
  53.     trap    #1        ; do it
  54.     adda.l    #$c,a7        ; tidy stack
  55.  
  56.     move.w    (a6),-(a7)    ; file handle
  57.     move.w    #$3e,-(a7)    ; f_close
  58.     trap    #1        ; do it !!
  59.     addq.l    #4,a7        ; tidy stack
  60.  
  61.     lea    pic_adr-124,a0    ; set up picture palette
  62.     lea    $ffff8240.W,a1    ; hardware palette
  63.     movem.l    (a0),d0-d7    ; move from one
  64.     movem.l    d0-d7,(a1)    ; to the other
  65.  
  66.     move.l    $44e.w,a0        ; current screen address
  67.     lea    pic_adr,a1    ; source
  68.     move.w    #$1F3F,d0        ; (32000/4)-1 = $1F3F (7999)
  69. bmove    move.l    (a1)+,(a0)+    ; move it
  70.     dbf    d0,bmove        ; loop
  71.  
  72. exit    rts            ; bye bye
  73.  
  74. filename    dc.b    '\test.neo',0
  75.  
  76.     ifne    text_on
  77. text    dc.b    $1B,'E'
  78.     dc.b    'Picture Loading !!',0
  79.     endc    
  80.  
  81. handle    ds.w    1
  82. ;
  83. ; Alter length of 'blanks' to ensure length of bootsector is equal
  84. ; to 480 bytes !!
  85. ;
  86.     ifne    text_on
  87. blanks    ds.w    149    ; amount when text function is on
  88.     elseif
  89. blanks    ds.w    166    ; and when it's off
  90.     endc
  91.